<%@page import="control.UserSession"%>
<%
	UserSession usr = (UserSession) request.getSession().getAttribute("USERSESSION");
%>

<div class="navbar">
<div class="navbar-inner">
<ul class="nav">
	<li id="currentBooking"><a href="<%=getServletContext().getContextPath()%>/CurrentBooking">View Current Booking</a></li>
	<% if(usr.isAdmin()){ %>
		<li id="manageFacility"><a href="<%=getServletContext().getContextPath()%>/LoadFacility">Manage Facility</a></li>
		<li id="manageUser"><a href="<%=getServletContext().getContextPath()%>/LoadUser">Manage User</a></li>
		<li id="loadPriority"><a href="<%=getServletContext().getContextPath()%>/LoadPriority">Manage Priority</a></li>
		<li id="manageUser"><a href="<%=getServletContext().getContextPath()%>/LoadHoliday">Manage Holiday</a></li>
	<%}else{%>
		<% if(usr.isManager()){ %>
			<li id="managebooking"><a href="<%=getServletContext().getContextPath()%>/SearchBookingbyStatus">Manage Booking</a></li>
		<%}%>
		<li id="searchFacility"><a href="<%=getServletContext().getContextPath()%>/SearchPage.jsp">Search Facility</a></li>
		<li id="searchBook"><a href="<%=getServletContext().getContextPath()%>/SearchBook">View Booking History</a></li>
		<li id="makebooking"><a href="<%=getServletContext().getContextPath()%>/Available.jsp">Make a Booking</a></li>
	<%}%>
	<li id="logout"><a href="<%=getServletContext().getContextPath()%>/Logout">Log out</a></li>
</ul>
</div>
</div>

<% 
	String menuItem = request.getParameter("menuitem");
	if(menuItem != null){
%>
	<script>
	$(document).ready(function() {
		   $("#<%=menuItem%>").addClass("active");
	});
	</script>
<%
	}
%>